<!DOCTYPE html>
<html>
	<head>
        <title>Sending on custom action</title>
		<link rel="stylesheet" href="../../codebase/webix.css" type="text/css" media="screen" charset="utf-8">
		<script src="../../codebase/webix.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="uploader_container" style="width: 500px; height: 200px; margin: 40px;"></div>
		<script type="text/javascript" charset="utf-8">
		webix.ready(function() {
			webix.ui({
				container:"uploader_container",
				view:"form", rows: [
					{ 
						view: "uploader", id:"upl1",
						autosend:false, value: 'Upload file',
						link:"mylist",  upload:"php/upload.php" 
					},
					{
					 	view:"list",  id:"mylist", type:"uploader",
						autoheight:true, borderless:true
					},
					{ view: "button", label: "Save files", click: function() {
						$$("upl1").send(function(response){
							if(response)
								webix.message(response.status);
						});
					}}
				]
			});

			/*$$("upl1").attachEvent("onUploadComplete", function(){
							webix.message("done");
						});*/
		});
		</script>
	</body>
</html>